Item Functions

Also see: Generic Functions

createItem()

Creates an empty ItemData.
Returns the ItemData > ItemKey.

createItemFromFile(Identifier Type > String)

Creates an ItemData, from an ItemFileData.
Returns the ItemData > ItemKey.

copyItem(ItemData > ItemKey)

Creates a copy of the given ItemData.
Returns the ItemData > ItemKey of the copy.

addItemReference(InventoryData > InventoryKey, ItemData > ItemKey)

Adds the given ItemData to the given InventoryData. Doesn't change ownership and the item will still be present in the original inventory.
Returns the ItemData > ItemKey.

addItemFromFile(InventoryData > InventoryKey, Identifier Type > String)

First creates an ItemData from the given ItemFileData and then adds it to the given InventoryData.
Returns the ItemData > ItemKey.

removeItem(InventoryData > InventoryKey, ItemData > ItemKey)

Removes the given ItemData from the given InventoryData.

removeItemFromOwner(ItemData > ItemKey)

Removes the given ItemData from its owning InventoryData.

equipItem(ItemData > ItemKey)

The CharacterData that owns the InventoryData that owns the given ItemData, equips the item.

unequipItem(ItemData > ItemKey)

The CharacterData that owns the InventoryData that owns the given ItemData, unequips the item.

getItemOutfitInfo(ItemData > ItemKey)

Returns an info of the outfit of an item as a table.
Table content:
"identifier" = the identifier of the outfit
"option" = the option of the outfit
"type" = the type of the outfit

getItemFilesByOutfitType(OutfitType Type > String)

Returns all ItemFileDatas with the given outfit type.

getItemFilesByLabel(Label Type > String)

Returns all ItemFileDatas with the given item label.

getItemFilesByAllLabels(Labels Type > Array of Type > String)

Returns all ItemFileDatas with all of the given item labels.

getItemFilesByAnyLabels(Labels Type > Array of Type > String)

Returns all ItemFileDatas with any of the given item labels.